{
 Pashkevich_Ivan
 19.09.2012
 This program writes Pascal Try-Angle
}
program Tri_Angle_Pascal;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, i, j : integer;
  mass: array of array of integer;

begin
  readln(a);
  setlength(mass,a+1,a+1);
  mass[1,1]:=1;
  writeln(mass[1,1],' ');
  for i:=2 to a do
  begin
    for j:=1 to i do
    begin
      mass[i,j]:=mass[i-1,j]+mass[i-1,j-1];
      write(mass[i,j],' ');
    end;
    writeln;
  end;
  readln;
end.
